<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title>AWK</title>
</head>
<body style='line-height:26px;white-space:pre-wrap;'>
以空格分割输出第一列
ll | awk  '{print $1}'

以KEMBO分割输出第一列
ll | awk -F kembo '{print $1}'

把所有第二列相加
ll | awk '{sum +=$2};END {print sum}'

 ll --sort=time | tac
 
查询稊二列值大于1000
ls -l | awk '{if($5 > 1000) print $0 }'

查询第6列大系紧二列的
ls -l | awk '$6 > $2 { print i + 1 ,$0; i++}'

过滤长度小于64的
ls -l | awk 'length < 64'

POSIX options:		GNU long options:
	-f progfile		--file=progfile
	-F fs			--field-separator=fs
	-v var=val		--assign=var=val
	-m[fr] val
	-W compat		--compat
	-W copyleft		--copyleft
	-W copyright		--copyright
	-W dump-variables[=file]	--dump-variables[=file]
	-W exec=file		--exec=file
	-W gen-po		--gen-po
	-W help			--help
	-W lint[=fatal]		--lint[=fatal]
	-W lint-old		--lint-old
	-W non-decimal-data	--non-decimal-data
	-W profile[=file]	--profile[=file]
	-W posix		--posix
	-W re-interval		--re-interval
	-W source=program-text	--source=program-text
	-W traditional		--traditional
	-W usage		--usage
	-W use-lc-numeric	--use-lc-numeric
	-W version		--version

To report bugs, see node `Bugs' in `gawk.info', which is
section `Reporting Problems and Bugs' in the printed version.

gawk is a pattern scanning and processing language.
By default it reads standard input and writes standard output.

Examples:
	gawk '{ sum += $1 }; END { print sum }' file
	gawk -F: '{ print $1 }' /etc/passwd

</body>
</html>

